{% extends "base.html" %}

{% block navigation %} 
<nav class="ink-navigation">
	<ul class="breadcrumbs">
		<li class="active">Articles</li>
	</ul>
</nav>
{% endblock %}


{% block content %} 
    <h3>Derniers articles parus :</h3>
    
    {% for article in art_list %}
        <div class="articleResume">
            <h4> {{ article.title }} </h4>
            <p class="infosArticle"> Publié le {{ article.date }} par {{ article.autor }}
            {% if article.preContent %} <p><span class="preContent"> {{ article.preContent }} </span></p> {% endif %}
             <p>
                <a href="{% url "blog.views.view_article" article.id %}">view more...</a>
            </p>
        </div>
    {% endfor %}
    
    <div class="pagination">
        <span class="step-links">
            {% if art_list.has_previous %}
                <a href="?page={{ art_list.previous_page_number }}">previous</a>
            {% endif %}
            <span class="current">
                Page {{art_list.number}} of {{art_list.paginator.num_pages}}
            </span>
            {% if art_list.has_next%}
                <a href="?page={{ art_list.next_page_number }}">next</a>
            {% endif %}
        </span>
    </div>
{% endblock %}
